{% extends 'base.html' %}

{% block meta %}
<meta name="keywords" content="{{ site.keywords }}" />
<meta name="description" content="{{ site.description }}" />
{% endblock %}

{% block title %}{{ i18n.home }} - {{ site.slogan }} - {% endblock %}

{% block content %}
{% for channel in channels %}
  {% if loop.index0 % 2 == 0 %}<div class="row">{% endif %}
  <div class="span4">
  <div class="{{ site and site.media and site.media.cls.boxtitle }}"><a href="{{ channel.url }}">{{ channel.name }}</a></div>
  {% for pageitem in channel.events %}
    <div class="{{ site and site.media and site.media.cls.pagetitle }}">
    {% if pageitem.event %}{% if pageitem.event.exposed %}
      <a target="_blank" href="{{ pageitem.event.url }}">{{ pageitem.event.keyword }}</a>
    {% else %}
      <span class="{{ site and site.media and site.media.cls.pageevent }}" url="{{ pageitem.event.url }}">{{ pageitem.event.keyword }}</span>
    {% endif %}{% endif %}
    </div>
  {% endfor %}
  </div>
  {% if loop.index0 % 2 == 1 or loop.index == loop.length %}</div>{% endif %}
{% endfor %}

{% for charts in chartses %}
  {% if loop.index0 % 2 == 0 %}<div class="row">{% endif %}
  <div class="span4">
  <div class="{{ site and site.media and site.media.cls.boxtitle }}"><a href="{{ charts.url }}">{{ charts.source.name }}</a></div>
  {% for pageitem in charts.pages %}
    <div class="{{ site and site.media and site.media.cls.pagetitle }}">
    {{ pageitem.rank }}. <span class="{{ site and site.media and site.media.cls.pagekeyword }}">{{ pageitem.keyword }}</span>
    </div>
  {% endfor %}
  </div>
  {% if loop.index0 % 2 == 1 or loop.index == loop.length %}</div>{% endif %}
{% endfor %}

{% endblock %}

